package priv.ln.field_method.field.exer2;

/**
 * ClassName: EmployeeTest
 * Package: priv.ln.field_method.field.exer2
 * Description:
 *在EmployeeTest测试类中的main()中，创建两个员工对象，并为他们的姓名和生日赋值，并显示
 * @Author 辣辣
 * @Create 2024/6/17 17:19
 * @Version 1.0
 */
public class EmployeeTest {
    public static void main(String[] args) {
        Employee emp1 = new Employee();

        emp1.name = "tom";
        emp1.birthday = new MyData();
        emp1.birthday.year = 2001;
        emp1.birthday.month = 2;
        emp1.birthday.day = 25;

        System.out.println("员工1的姓名：" + emp1.name + ",生日：" +
                emp1.birthday.year + "年" + emp1.birthday.month + "月"
                + emp1.birthday.day + "日");

        Employee emp2 = new Employee();
        emp2.name = "jack";
        emp2.birthday = new MyData();
        emp2.birthday.year = 2000;
        emp2.birthday.month = 12;
        emp2.birthday.day = 3;

        System.out.println("员工1的姓名：" + emp2.name + ",生日：" +
                emp2.birthday.year + "年" + emp2.birthday.month + "月"
                + emp2.birthday.day + "日");
    }
}

